const express = require('express')
const router = express.Router()
const userHander = require('./router_handler/user')
const updateUserInfo = require('./router_handler/userinfo')
// 导入验证数据合法性的中间件
const expressJoi = require('@escook/express-joi')
// 导入需要的验证规则对象
const {reg_login_schema} = require('../schema/user')
// 更新用户的基本信息
router.get('/userinfo',expressJoi(reg_login_schema),userHander.getUserInfo)
router.post('/userinfo',updateUserInfo.updateUserInfo)
router.post('/updatepwd',updateUserInfo.updatePassword)
module.exports = router